package com.sangu.dianxiu.bean.order;

import java.io.Serializable;
import java.util.List;

/**
 * 订单类
 * Created by sg2 on 2016/1/12.
 */
public class OrderEntity implements Serializable{


    /**
     * rc : 0
     * orders : [{"items":[{"itemId":1,"itemName":"空调不制冷"}],"orderId":74,"orderType":0,"orderNo":"DD201601130001","addTime":1452664284000,"orderTime":1452653485000,"status":2,"isWarranty":false},{"items":[{"itemId":4,"itemName":"洗衣机异响"}],"orderId":75,"orderType":0,"orderNo":"A201601130001","addTime":1452686178000,"orderTime":1452657379000,"status":1,"isWarranty":false},{"items":[{"itemId":1,"itemName":"空调不制冷"}],"orderId":77,"orderType":0,"orderNo":"A201601130003","addTime":1452687217000,"orderTime":1452658417000,"status":1,"isWarranty":false},{"items":[{"itemId":1,"itemName":"空调不制冷"}],"orderId":80,"orderType":0,"orderNo":"A201601140001","addTime":1452736923000,"orderTime":1452736924000,"status":1,"isWarranty":false},{"items":[{"itemId":1,"itemName":"空调不制冷"}],"orderId":81,"orderType":0,"orderNo":"A201601140002","addTime":1452737844000,"orderTime":1452737845000,"status":1,"isWarranty":false},{"items":[{"itemId":1,"itemName":"空调不制冷"}],"orderId":86,"orderType":0,"orderNo":"A201601140007","addTime":1452744424000,"orderTime":1452744424000,"status":1,"isWarranty":false}]
     */

    private int rc;
    /**
     * items : [{"itemId":1,"itemName":"空调不制冷"}]
     * orderId : 74
     * orderType : 0
     * orderNo : DD201601130001
     * addTime : 1452664284000
     * orderTime : 1452653485000
     * status : 2
     * isWarranty : false
     */

    private List<OrdersEntity> orders;

    public void setRc(int rc) {
        this.rc = rc;
    }

    public void setOrders(List<OrdersEntity> orders) {
        this.orders = orders;
    }

    public int getRc() {
        return rc;
    }

    public List<OrdersEntity> getOrders() {
        return orders;
    }

    public static class OrdersEntity {
        private int orderId;
        private int orderType;
        private String orderNo;
        private long addTime;
        private long orderTime;
        private int status;
        private boolean isWarranty;
        /**
         * itemId : 1
         * itemName : 空调不制冷
         */

        private List<ItemsEntity> items;

        public void setOrderId(int orderId) {
            this.orderId = orderId;
        }

        public void setOrderType(int orderType) {
            this.orderType = orderType;
        }

        public void setOrderNo(String orderNo) {
            this.orderNo = orderNo;
        }

        public void setAddTime(long addTime) {
            this.addTime = addTime;
        }

        public void setOrderTime(long orderTime) {
            this.orderTime = orderTime;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public void setIsWarranty(boolean isWarranty) {
            this.isWarranty = isWarranty;
        }

        public void setItems(List<ItemsEntity> items) {
            this.items = items;
        }

        public int getOrderId() {
            return orderId;
        }

        public int getOrderType() {
            return orderType;
        }

        public String getOrderNo() {
            return orderNo;
        }

        public long getAddTime() {
            return addTime;
        }

        public long getOrderTime() {
            return orderTime;
        }

        public int getStatus() {
            return status;
        }

        public boolean isIsWarranty() {
            return isWarranty;
        }

        public List<ItemsEntity> getItems() {
            return items;
        }

        public static class ItemsEntity {
            private int itemId;
            private String itemName;

            public void setItemId(int itemId) {
                this.itemId = itemId;
            }

            public void setItemName(String itemName) {
                this.itemName = itemName;
            }

            public int getItemId() {
                return itemId;
            }

            public String getItemName() {
                return itemName;
            }
        }
    }
}
